/* reducers/lib/reducers_proxy.js */
/**
 * reducers代理方法
 * 	统一按照类型前缀 加状态类型
 * 		所有类型至少存在加载中，完成和失败
 * @param  {String} typePrefix 类型前缀
 * @return {Object} 状态
 */
export default function (typePrefix) {
	return (state = {},action)=>{
		const { type , lists , payload } = action;
		if(type === `${typePrefix}_PENDING` || 
		   type === `${typePrefix}_FULFILLED` ||
		   type === `${typePrefix}_REJECTED`){
			return action;
		}else{
			return state;
		}
	}
}